<template>
    <div class="knowledgeTree view">
        <!-- <keep-alive include="KnowledgeTreeMenu"> -->
            <transition :name="transitionName">
                <router-view class="router_view"></router-view>
            </transition>
        <!-- </keep-alive> -->
    </div>
</template>

<script>
export default {
    name: 'knowledgeTree',
    data(){
        return {
            transitionName: "slide-right",
        }
    },
    beforeRouteUpdate(to, from, next) {
        let isBack = this.$router.isBack;
        // console.log(this.$router.isBack)
        if (isBack) {
        this.transitionName = "slide-right";
        } else {
        this.transitionName = "slide-left";
        }
        this.$router.isBack = false;
        next();
    }
   
}
</script>

<style lang="less" scoped>

</style>